#Responsability:
#Prepare de parameters for the Ldndc model

ParametersInit <- setRefClass(    
  "parametersInit"
  , fields = list(
    folder="character",
    file="character",
    colnames="character"
  )
  , methods = list(
    #
    #
    # Constructor
    #
    #
    initialize = function(folder = configuration@commonFolder,
                          file = configuration@parameterInitFile, 
                          colnames = configuration@parameterInitColumns, ...)
    {
      
      callSuper(..., 
                folder = folder,
                file = file,
                colnames = colnames)
    },
    #
    #
    # Read the file with the prior probability distribution configuration
    # Return: the prior probability distribution
    #
    #
    priorProbabilityDistribution = function() {
      
      print("METHOD IN: priorProbabilityDistribution")
      
      priorProbabilityDistribution <- read.table(paste(folder,file,sep=""))
     
      colnames(priorProbabilityDistribution) <- colnames
      
      #  show(priorProbabilityDistribution)
      print("METHOD OUT: priorProbabilityDistribution")
      
      priorProbabilityDistribution
    },
    #
    #
    # Get the first values of the parameter
    #
    #
    firstParameters =  function(parameterDistribution) {
      
      print("METHOD IN: firstParameters")
      
      parameter <- data.frame(parameterDistribution$init ,row.names=parameterDistribution$name)
      
      print("METHOD OUT: firstParameters")
      
      parameter
    }
    
    
  )#End methods List 
  
)#End RefClass
